package ftdpc.properties;

import lombok.Data;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 名称: 任务配置
 *
 * @description:
 * @author: XXSD
 * @date: 2023-08-22 23:25
 */
@Data
@Slf4j
@Accessors(chain = true)
@ConfigurationProperties(prefix = "task")
public class TaskConfig {
    /**
     * 属性描述：任务线程池大小
     * <br />
     * 默认：20
     *
     * @date: 2023-08-22 23:29
     */
    private Integer poolSize = 20;

    /**
     * 属性说明: 任务线程名称前缀
     *
     * @date: 2023-08-22 23:29
     */
    private String namePrefix = "Task-Business-Processing";

    /**
     * 属性描述：是否将取消后的任务从队列删除
     *
     * @date: 2023-08-22 23:29
     */
    private Boolean removeOnCancelPolicy = Boolean.TRUE;

    /**
     * 属性描述：等待任务完成并关闭
     *
     * @date: 2023-08-22 23:29
     */
    private Boolean waitForTasksToCompleteOnShutdown = Boolean.TRUE;
}
